package API.DAY7.thread;

public class ThreadInfoDemo {
    public static void main(String[] args) {
        Thread main = Thread.currentThread();
        System.out.println(main);
        dosome();
    }
    public static void dosome(){
        Thread t = Thread.currentThread();
        System.out.println("dosome线程:"+t);

        System.out.println("名字:"+t.getName());
        System.out.println("唯一标识:"+t.getId());
        System.out.println("优先级:"+t.getPriority());

        System.out.println("是否是活动线程:"+t.isAlive());
        System.out.println("是否是守护线程:"+t.isDaemon());
        System.out.println("是否是中断状态:"+t.isInterrupted());

    }
}
